package com.mdd.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("订单操作流水实体")
@TableName("order_flow_info")
public class OrderFlowInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
    @ApiModelProperty(value = "")
    private Long id;

    @ApiModelProperty(value = "流水编号")
    private String flowNo;

    @ApiModelProperty(value = "订单id")
    private Long orderid;

    @ApiModelProperty(value = "用户id")
    private Long userid;

    @ApiModelProperty(value = "操作金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "项目名称")
    private String itemName;

    @ApiModelProperty(value = "状态")
    private Long status;

    @ApiModelProperty(value = "三方订单号")
    private String outTradeNo;

    @ApiModelProperty(value = "0支付 1退款 2押金冻结 3 取消押金冻结 4 代扣签约 5取消代扣签约 6 代扣")
    private Integer type;

    @ApiModelProperty(value = "来源渠道 0支付宝小程序")
    private Integer sourceAppId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "删除状态 0未删除 1 已删除")
    @TableLogic
    private Integer isDelete;

}
